package MyBatis;

import MyBatis.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.annotations.DeleteProvider;

import java.util.Map;

import java.util.List;

public interface UserMapper {
    @Select("SELECT * FROM users")
    List<User> getAllUsers();

    @UpdateProvider(type = UserSqlProvider.class, method = "updateUser")
    int updateUser(Map<String, Object> params);

    @DeleteProvider(type = UserSqlProvider.class, method = "deleteUsers")
    int deleteUsers(List<Integer> ids);
}